<template>
	<header class="header">
		<h1>备忘录</h1>
		<input v-model.trim="value" class="new-todo" placeholder="请输入您将要做的事情" autofocus @keyup.enter="add(value)">
	</header>
</template>

<script>
	export default{
		data(){
			return{
				value:''
			}
		},
		methods:{
			add(){
				this.$emit("add",this.value)
				this.value=''
			}
		}
	}
</script>

<style>
</style>
